package com.ly.hotel.spainterface.jxd.bean;

import java.util.Comparator;

/**
 * Created by ThinkPad on 2018/3/28.
 * // 按技师号，从低到高排序
 */

public class SortByArtNo implements Comparator{

    @Override
    public int compare(Object obj1, Object obj2) {
        Therapy therapy1 = (Therapy) obj1;
        Therapy therapy2 = (Therapy) obj2;
        String artNo1 = therapy1.getArtNo();
        String artNo2 = therapy2.getArtNo();
        int no1 = Integer.parseInt(artNo1);
        int no2 = Integer.parseInt(artNo2);
        if(no1 > no2){
            return 1;
        }else {
            return -1;
        }
    }
}
